/*
 * AnexarComentario.java
 *
 * Created on 25/02/2011, 13:27:21
 */

package pbf.dialog;

/**
 *
 * @author User
 */
public class AnexarComentario extends javax.swing.JDialog
{
    public AnexarComentario(java.awt.Frame parent, boolean modal)
    {
        super(parent, modal);
        initComponents();
    }

    public static String getComentario()
    {
        return comentario.getText();
    }

    public void setComentario(String texto)
    {
        comentario.setText(texto);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        comentario = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jButton1 = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(null);

        comentario.setColumns(20);
        comentario.setFont(new java.awt.Font("Arial", 0, 16)); // NOI18N
        comentario.setRows(5);
        jScrollPane1.setViewportView(comentario);

        getContentPane().add(jScrollPane1);
        jScrollPane1.setBounds(10, 60, 490, 140);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 16));
        jLabel1.setText("Comentário");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 30, 490, 20);
        getContentPane().add(jSeparator1);
        jSeparator1.setBounds(10, 50, 490, 10);

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pbf/imagens/paper-clip.png"))); // NOI18N
        jButton1.setText("Anexar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton1);
        jButton1.setBounds(393, 250, 110, 25);
        getContentPane().add(jSeparator2);
        jSeparator2.setBounds(0, 240, 520, 20);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-531)/2, (screenSize.height-330)/2, 531, 330);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    setVisible(false);
    }//GEN-LAST:event_jButton1ActionPerformed

    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                AnexarComentario dialog = new AnexarComentario(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private static javax.swing.JTextArea comentario;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    // End of variables declaration//GEN-END:variables

}
